import Mock from 'mockjs'
import Common from './common.js'
const Random = Mock.Random
const user = {
  token: 'admin',
  avatar: 'https://avatars3.githubusercontent.com/u/18433054?s=40&v=4',
  name: Random.cname(),
  email: Random.email()
}

export default {
  login: () => {
    return Common.ajaxObj(user)
  },
  logout: () => {
    return Common.ajaxObj('', 0, '用户登出失败')
  }
}
